/**
 * 地区管展示 20180104 mxm
 */
define(function(require,exports,module) {
    var myPub = require('./public');


    var areaName =[
        {
            'name': '华南区',
            'class': 'huanan-museum'
        },
        {
            'name': '华东区',
            'class': 'huadong-museum'
        },
        {
            'name': '华北区',
            'class': 'huabei-museum'
        },
        {
            'name': '中南区',
            'class': 'zhongnan-museum'
        },
        {
            'name': '华西区',
            'class': 'huaxi-museum'
        }
    ];


    var Act={
        init:function(obj){

            this.huananImg=[
                "/Public/static/img/cityMuseum/huanan/1guang-shenzhen.jpg",
                "/Public/static/img/cityMuseum/huanan/2guang-guangzhou.jpg",
                "/Public/static/img/cityMuseum/huanan/3guang-dongguan.jpg",
                "/Public/static/img/cityMuseum/huanan/4guang-hainan.jpg",
                "/Public/static/img/cityMuseum/huanan/5guang-foshan.jpg",
                "/Public/static/img/cityMuseum/huanan/6guang-zhongshan.jpg",
                "/Public/static/img/cityMuseum/huanan/7guang-huizhou.jpg",
                "/Public/static/img/cityMuseum/huanan/8guang-wuyi.jpg",
                "/Public/static/img/cityMuseum/huanan/9guang-chaoshan.jpg",

            ];
            this.huananHrefArray=[
                "http://m.sfddj.com/Shop/Index/home.html?city=%E6%B7%B1%E5%9C%B3&sell_member_id=1533328",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E5%B9%BF%E5%B7%9E&sell_member_id=1533309",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E4%B8%9C%E8%8E%9E&sell_member_id=1533347",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E6%B5%B7%E5%8F%A3&sell_member_id=1533286",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E4%BD%9B%E5%B1%B1&sell_member_id=1533305",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E4%B8%AD%E5%B1%B1&sell_member_id=1533346",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E6%83%A0%E5%B7%9E&sell_member_id=1533311",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E6%B1%9F%E9%97%A8&sell_member_id=1533340",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E6%B1%95%E5%A4%B4&sell_member_id=1533300",
            ];

            this.huadongImg=[
                "/Public/static/img/cityMuseum/huadong/1guang-shanghai.jpg",
                "/Public/static/img/cityMuseum/huadong/2guang-nanjing.jpg",
                "/Public/static/img/cityMuseum/huadong/3guang-hangzhou.jpg",
                "/Public/static/img/cityMuseum/huadong/4guang-ningbo.jpg",
                "/Public/static/img/cityMuseum/huadong/5guang-wuxi.jpg",
                "/Public/static/img/cityMuseum/huadong/6guang-jiaxing.jpg",
                "/Public/static/img/cityMuseum/huadong/7guang-nantong.jpg",

            ];
            this.huadongHrefArray=[
                "http://m.sfddj.com/Shop/Index/home.html?city=%E4%B8%8A%E6%B5%B7&sell_member_id=1533293",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E5%8D%97%E4%BA%AC&sell_member_id=1533319",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E6%9D%AD%E5%B7%9E&sell_member_id=1533310",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E5%AE%81%E6%B3%A2&sell_member_id=1533321",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E6%97%A0%E9%94%A1&sell_member_id=1533339",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E5%98%89%E5%85%B4&sell_member_id=1533315",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E5%8D%97%E9%80%9A&sell_member_id=1533320",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E5%B8%B8%E5%B7%9E&sell_member_id=1533299",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E7%BB%8D%E5%85%B4&sell_member_id=1533327",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E6%B7%AE%E5%AE%89&sell_member_id=1533330",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E8%8B%8F%E5%B7%9E&sell_member_id=1533332",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E5%8F%B0%E5%B7%9E&sell_member_id=1533334",
            ];

            this.huabeiImg=[
                "/Public/static/img/cityMuseum/huabei/1guang-beijing.jpg",
                "/Public/static/img/cityMuseum/huabei/2guang-dalian.jpg",
                "/Public/static/img/cityMuseum/huabei/3guang-shanxi.jpg",
                "/Public/static/img/cityMuseum/huabei/4guang-qingdao.jpg",
                "/Public/static/img/cityMuseum/huabei/5guang-jizhou.jpg",
                "/Public/static/img/cityMuseum/huabei/6guang-neimengu.jpg",
                "/Public/static/img/cityMuseum/huabei/7guang-sheyang.jpg",
                "/Public/static/img/cityMuseum/huabei/8guang-heilongjiang.jpg",
                "/Public/static/img/cityMuseum/huabei/9guang-jinan.jpg",
                "/Public/static/img/cityMuseum/huabei/10guang-luzhoug.jpg",
                "/Public/static/img/cityMuseum/huabei/11guang-yantai.jpg",
                "/Public/static/img/cityMuseum/huabei/12guang-jilin.jpg",
                "/Public/static/img/cityMuseum/huabei/13guang-tianjin.jpg",
                "/Public/static/img/cityMuseum/huabei/14guang-jibei.jpg",

            ];
            this.huabeiHrefArray=[
                "http://m.sfddj.com/Shop/Index/home.html?city=%E5%8C%97%E4%BA%AC&sell_member_id=1533281",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E5%A4%A7%E8%BF%9E&sell_member_id=1533301",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E5%A4%AA%E5%8E%9F&sell_member_id=1533291",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E9%9D%92%E5%B2%9B&sell_member_id=1533324",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E7%9F%B3%E5%AE%B6%E5%BA%84&sell_member_id=1533314",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E5%91%BC%E5%92%8C%E6%B5%A9%E7%89%B9&sell_member_id=1533289",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E6%B2%88%E9%98%B3&sell_member_id=1533329",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E5%93%88%E5%B0%94%E6%BB%A8&sell_member_id=1533287",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E6%B5%8E%E5%8D%97&sell_member_id=1533312",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E6%BD%8D%E5%9D%8A&sell_member_id=1533318",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E7%83%9F%E5%8F%B0&sell_member_id=1533343",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E5%90%89%E6%9E%97&sell_member_id=1533288",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E5%A4%A9%E6%B4%A5&sell_member_id=1533295",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E5%BB%8A%E5%9D%8A&sell_member_id=1533313",
            ];

            this.zhongnanImg=[
                "/Public/static/img/cityMuseum/zhongnan/1guang-wannan.jpg",
                "/Public/static/img/cityMuseum/zhongnan/2guang-wanbei.jpg",
                "/Public/static/img/cityMuseum/zhongnan/3guang-edong.jpg",
                "/Public/static/img/cityMuseum/zhongnan/4guang-fuzhou.jpg",
                "/Public/static/img/cityMuseum/zhongnan/5guang-yubei.jpg",
                "/Public/static/img/cityMuseum/zhongnan/6guang-yunan.jpg",
                "/Public/static/img/cityMuseum/zhongnan/7guang-xiameng.jpg",

                "/Public/static/img/cityMuseum/zhongnan/8guang-exi.jpg",
                "/Public/static/img/cityMuseum/zhongnan/9guang-xiangbei.jpg",
                "/Public/static/img/cityMuseum/zhongnan/10guang-gannan.jpg",
                "/Public/static/img/cityMuseum/zhongnan/11guang-xiangnan.jpg",
                "/Public/static/img/cityMuseum/zhongnan/12guang-ganbei.jpg",
                "/Public/static/img/cityMuseum/zhongnan/13guang-putian.jpg",
                "/Public/static/img/cityMuseum/zhongnan/14guang-quanzhou.jpg",
            ];
            this.zhongnanHrefArray=[
                "http://m.sfddj.com/Shop/Index/home.html?city=%E9%BB%84%E5%B1%B1&sell_member_id=1533337",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E5%90%88%E8%82%A5&sell_member_id=1533336",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E6%AD%A6%E6%B1%89&sell_member_id=1533303",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E7%A6%8F%E5%B7%9E&sell_member_id=1533306",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E6%96%B0%E4%B9%A1&sell_member_id=1533344",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E5%8D%97%E9%98%B3&sell_member_id=1533345",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E5%8E%A6%E9%97%A8&sell_member_id=1533326",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E5%AE%9C%E6%98%8C&sell_member_id=1533304",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E5%B2%B3%E9%98%B3&sell_member_id=1533341",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E8%B5%A3%E5%B7%9E&sell_member_id=1533308",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E8%A1%A1%E9%98%B3&sell_member_id=1533342",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E5%8D%97%E6%98%8C&sell_member_id=1533307",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E8%8E%86%E7%94%B0&sell_member_id=1533322",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E6%B3%89%E5%B7%9E&sell_member_id=1533325",
            ];
            this.huaxiImg=[
                "/Public/static/img/cityMuseum/huaxi/1guang-sichuan.jpg",
                "/Public/static/img/cityMuseum/huaxi/2guang-nixia.jpg",
                "/Public/static/img/cityMuseum/huaxi/3guang-shaxi.jpg",
                "/Public/static/img/cityMuseum/huaxi/4guang-xinjiang.jpg",
                "/Public/static/img/cityMuseum/huaxi/5guang-yunnan.jpg",
                "/Public/static/img/cityMuseum/huaxi/6guang-chongqing.jpg",
                "/Public/static/img/cityMuseum/huaxi/7guang-gansu.jpg",
                "/Public/static/img/cityMuseum/huaxi/8guang-guizhou.jpg",

            ];
            this.huaxiHrefArray=[
                "http://m.sfddj.com/Shop/Index/home.html?city=%E6%88%90%E9%83%BD&sell_member_id=1533294",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E9%93%B6%E5%B7%9D&sell_member_id=1533290",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E8%A5%BF%E5%AE%89&sell_member_id=1533292",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E4%B9%8C%E9%B2%81%E6%9C%A8%E9%BD%90&sell_member_id=1533296",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E6%B7%AE%E5%AE%89&sell_member_id=1533297",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E9%87%8D%E5%BA%86&sell_member_id=1533298",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E5%85%B0%E5%B7%9E&sell_member_id=1533282",
                "http://m.sfddj.com/Shop/Index/home.html?city=%E8%B4%B5%E9%98%B3&sell_member_id=1533284",
            ],

            Act.setHtml(areaName, function () {
                Act.setHerf($(".huanan-museum ul"), Act.huananImg, Act.huananHrefArray);
                Act.setHerf($(".huadong-museum ul"), Act.huadongImg, Act.huadongHrefArray);
                Act.setHerf($(".huabei-museum ul"), Act.huabeiImg, Act.huabeiHrefArray);
                Act.setHerf($(".zhongnan-museum ul"), Act.zhongnanImg, Act.zhongnanHrefArray);
                Act.setHerf($(".huaxi-museum ul"), Act.huaxiImg, Act.huaxiHrefArray);
            });


        },

        setHerf: function (obj, sImg, sHref) {
            var imgArray= sImg;
            var dom_html='';
            for(var i=0; i<imgArray.length; i++){
                dom_html+='<li class="ciy-museum-list">';
                dom_html+='	<a href="'+sHref[i]+'">';
                dom_html+='		<img src="https://m.sfddj.com'+imgArray[i]+'"/>';
                dom_html+='	</a>';
                dom_html+='</li>';
            }
            obj.html(dom_html)
        },
        setHtml: function (name, fn) {
            var _this = this;
            var sAreaListBox = $('.js_areaList');
            var sHtml = '';
            for (var i=0; i<name.length; i++) {
                sHtml +=
                    '<div class="cityMuseum-banner">'+
                    '   <img src="https://m.sfddj.com/Public/static/img/cityMuseum/guang-banner2.jpg"/>'+
                    '   <span class="city-museum-name">'+ name[i].name +'</span>'+
                    '</div>'+
                    '<div class="ciy-museum '+ name[i].class +'">'+
                    '   <ul class="clearfix"></ul>'+
                    '</div>';
            }
            sAreaListBox.append($(sHtml));
            if(fn) fn();
        }
    };

    function AreaListShow(fn) {
        Act.init();
        if(fn) fn();
    }
    exports.AreaListShow = AreaListShow;
});